package com.jzo2o.customer.controller.open;


import com.jzo2o.common.model.Result;
import com.jzo2o.customer.model.dto.request.InstitutionRegisterReqDTO;
import com.jzo2o.customer.service.IServeProviderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 赵超
 */
@RestController
@Slf4j
@RequiredArgsConstructor
@RequestMapping("/open/serve-provider")
@Api(tags = "开放接口 - 注册")
public class RegisterController {

    private final IServeProviderService serveProviderService;

    /**
     * 注册
     */
    @ApiOperation("注册")
    @PostMapping("/institution/register")
    public Result<Object> register(@RequestBody InstitutionRegisterReqDTO dto) {
        serveProviderService.register(dto);
        return Result.ok("注册成功");
    }
}
